﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Data;
using System.Web.UI.WebControls;

namespace PM.Web
{
    public partial class Introduce : System.Web.UI.Page
    {
        public string TypeName = string.Empty;
        public string TypeValue = string.Empty;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Display();
            }
        }

        private void Display()
        {
            string id = Request.QueryString["id"].Trim();
            int iId = 0;
            if (!int.TryParse(id, out iId)) { this.TypeValue = "参数错误！"; return; }
            DataAccess.PmData dal = new DataAccess.PmData();
            DataTable dt = dal.GetWebSiteIntroduce(1, iId);
            if (dt.Rows.Count <= 0)
            {
                this.TypeValue = "没有找到数据！";
            }
            else
            {
                this.TypeName = dt.Rows[0]["TypeName"].ToString();
                this.TypeValue = dt.Rows[0]["TypeValue"].ToString();
            }
        }
    }
}